<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>面积和周长</title>
</head>
<body>


<input type="text" placeholder="半径" id="r">
<input type="text" placeholder="面积" id="s">
<input type="text" placeholder="周长" id="c">

<script>
var p=prompt("请输入你的半径");
    var r = p;
    var s = r * 2 * Math.PI;
    var c = r *r *Math.PI;
    document.querySelector("#r").value= r;
    document.querySelector("#s").value= s;
    document.querySelector("#c").value= c;
</script>

</body>
</html>